package com.igeek.javase.ch04.ordersByTeacher;

import java.util.Date;

/**
 * @author chenmin
 * 2023/7/14 9:03
 * @description TODO
 *
 * 商品
 */
public class Goods {

    private String name;
    private String desc;
    private Date createtime;
    private double price;

    public void showGoods(){
        System.out.println("商品名称："+name);
        System.out.println("商品描述："+desc);
        System.out.println("商品生产日期："+createtime);
        System.out.println("商品价格："+price);
    }

    public Goods() {
    }

    public Goods(String name, String desc, Date createtime, double price) {
        this.name = name;
        this.desc = desc;
        this.createtime = createtime;
        this.price = price;
    }

    /**
     * 获取
     * @return name
     */
    public String getName() {
        return name;
    }

    /**
     * 设置
     * @param name
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 获取
     * @return desc
     */
    public String getDesc() {
        return desc;
    }

    /**
     * 设置
     * @param desc
     */
    public void setDesc(String desc) {
        this.desc = desc;
    }

    /**
     * 获取
     * @return createtime
     */
    public Date getCreatetime() {
        return createtime;
    }

    /**
     * 设置
     * @param createtime
     */
    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    /**
     * 获取
     * @return price
     */
    public double getPrice() {
        return price;
    }

    /**
     * 设置
     * @param price
     */
    public void setPrice(double price) {
        this.price = price;
    }

    public String toString() {
        return "Goods{name = " + name + ", desc = " + desc + ", createtime = " + createtime + ", price = " + price + "}";
    }
}
